<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="UTF-8" />
		<meta http-equiv="X-UA-Compatible" content="IE=edge" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<title>Document</title>
		<style>
			.content {
				width: 1190px;
				margin: 0 auto;
				height: 800px;
				background-color: yellow;
			}
			.item {
				width: 230px;
				height: 322px;
				background-color: purple;
				float: left;
				color: #fff;
				/* margin-right: 10px; */
				margin: 0 5px;
			}
			/* 兼容性差 */
			/* .item:nth-child(5n) {
				margin-right: 0;
			} */
			/* 麻烦一点 */
			/* .last-child {
				margin-right: 0;
			} */
			.box {
				/* 为了时width变为1200px */
				/* margin-right: -10px; */

				margin: 0 -5px;
			}
		</style>
	</head>
	<body>
		<div class="content">
			<div class="box">
				<div class="item item1">1</div>
				<div class="item item2">2</div>
				<div class="item item3">3</div>
				<div class="item item4">4</div>
				<!-- <div class="item item5 last-child">5</div> -->
				<div class="item item5">5</div>

				<div class="item item1">1</div>
				<div class="item item2">2</div>
				<div class="item item3">3</div>
				<div class="item item4">4</div>
				<!-- <div class="item item5 last-child">5</div> -->
				<div class="item item5">5</div>
			</div>
		</div>
	</body>
</html>
